<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="../templates/template.xhtml">

	<ui:define name="painelCentral">
		<h:form>

			<table align="center">

				<tr>
					<td align="center"><h:panelGrid columns="3">
							<h:outputLabel for="nome"
								value="#{msg['manterUsuario.label.nome']}" />
							<h:inputText id="nome" value="#{gerenciarUsuarioMB.usuario.nome}"
								required="true"
								requiredMessage="#{msg['manterUsuario.mensagem.nomeObrigatorio']}"
								size="50" maxlength="50">
								<f:validateLength minimum="3" maximum="50" />
							</h:inputText>
							<h:message for="nome" class="mensagemDeErro" />

							<h:outputLabel for="email"
								value="#{msg['manterUsuario.label.email']}" />
							<h:inputText id="email"
								value="#{gerenciarUsuarioMB.usuario.email}" required="true"
								requiredMessage="#{msg['manterUsuario.mensagem.emailObrigatorio']}"
								size="50" maxlength="50">
								<f:validateLength minimum="3" maximum="50" />
							</h:inputText>
							<h:message for="email" class="mensagemDeErro" />

							<h:outputLabel for="senha"
								value="#{msg['manterUsuario.label.senha']}" />
							<h:inputText id="senha"
								value="#{gerenciarUsuarioMB.usuario.senha}" required="true"
								requiredMessage="#{msg['manterUsuario.mensagem.senhaObrigatorio']}"
								size="50" maxlength="50">
								<f:validateLength minimum="3" maximum="50" />
							</h:inputText>
							<h:message for="senha" class="mensagemDeErro" />

							<h:outputLabel for="data_cadastro"
								value="#{msg['manterUsuario.label.data_cadastro']}" />
							<rich:calendar
								value="#{gerenciarUsuarioMB.usuario.data_cadastro}"
								id="data_cadastro" popup="true" datePattern="dd/MM/yyyy"
								locale="pt_BR" showApplyButton="true" cellWidth="24px"
								cellHeight="22px" style="width:200px" disabled="false"
								required="true"
								requiredMessage="#{msg['manterUsuario.mensagem.dataObrigatoria']}">
							</rich:calendar>
							<h:message for="data_cadastro" class="mensagemDeErro" />

						</h:panelGrid> <br /></td>
				</tr>

				<tr>
					<td>
						<table align="center">
							<tr>
								<td><h:commandButton value="Salvar"
										action="#{gerenciarUsuarioMB.alterar}"
										image="../imagens/salvar.gif" /></td>
								<td><h:commandButton value="Cancelar"
										action="principal" immediate="true"
										image="../imagens/cancelar.gif" /></td>
							</tr>
						</table>
					</td>
				</tr>

			</table>

		</h:form>

	</ui:define>

</ui:composition>
